export const display={
    state:{
        showFilters:false,
        showPopOut:false,
        zoomLevel:'',
        lat:0.0,
        lng:0.0,
    },
    actions:{
        toggleShowFilters({commit},data){
            commit('setShowFilters',data.showFilters)
        },
        toggleShowPopOut({commit},data){
            commit('setShowPopOut',data.showPopOut);
        },
        applyZoomLevel({commit},data){
            commit('setZoomLevel',data.zoomLevel);
        },
        applyLat({commit},data){
            commit('setLat',data.lat);
        },
        applyLng({commmit},data){
            commit('setLng',data.lng);
        }
    },
    mutations:{
        setShowFilters(state,show){
            state.showFilters = show;
        },
        setShowPopOut(state,show){
            state.showPopOut = show;
        },
        setZoomLevel(state,zoomLevel){
            state.zoomLevel = zoomLevel;
        },
        setLat(state,lat){
            state.lat = lat;
        },
        setLng(state,lng){
            state.lng = lng;
        }
    },
    getters:{
        getShowFilters(state){
            return state.showFilters;
        },
        getShowPopOut(state){
            return state.showPopOut;
        },
        getZoomLevel(state){
            return state.zoomLevel;
        },
        getLat(state){
            return state.lat;
        },
        getLng(state){
            return state.lng;
        }
    }
};
